﻿#region

using System;
using System.Xml.Serialization;

#endregion

namespace DotNetMax.CodeGen.Model.Entity
{
    /// <summary>
    /// Entidade Base
    /// </summary>
    public class BaseEntity
    {
        #region Constructor

        public BaseEntity()
        {
            // Gera um Novo Guid Automáticamente
            this._GUID = Guid.NewGuid().ToString();
        }

        public BaseEntity(string filePath, string name) : this()
        {
            _FilePath = filePath;
            _Name = name;
        }

        public BaseEntity(string filePath, string name, string guid)
        {
            _FilePath = filePath;
            _Name = name;
            _GUID = guid;
        }

        #endregion

        #region Fields

        private string _FilePath;
        private string _GUID;
        private string _Name;

        #endregion

        #region Properties

        /// <summary>
        /// Retorna o Caminho do Arquivo
        /// </summary>
        [XmlAttribute("FilePath")]
        public string FilePath
        {
            get { return _FilePath; }
            set { _FilePath = value; }
        }

        /// <summary>
        /// Retorna o Nome
        /// </summary>
        [XmlAttribute("Name")]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        /// <summary>
        /// Retorna o GUID (Identificador da Entidade)
        /// </summary>
        [XmlAttribute("GUID")]
        public string GUID
        {
            get { return _GUID; }
            set { _GUID = value; }
        }

        #endregion
    }
}